﻿using System.IO;
using System.Text;

namespace Kotonoha.Server.Examples {
    public class ExampleFinder {
        public static string[] findAStringsByPositions(Stream file, Encoding e, params long[] positions) {
            string[] strings = new string[positions.Length];
            for (int i = 0; i < positions.Length; ++i) {
                file.Seek(positions[i], SeekOrigin.Begin);
                strings[i] = new StreamReader(file, e).ReadLine();
            }
            return strings;
        }
    }
}
